using UnityEngine;
using System.Collections;

public class ammo_rail : MonoBehaviour {
	
	const float damage = 1.5f; 
	
	// Use this for initialization
	void Start () {

	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnCollisionEnter(Collision col) {
		if (col.gameObject.tag == "Player") {
			col.gameObject.GetComponent<PlayerWControl>().decreaseHealth(damage);
		}
		Destroy(transform.gameObject);
	}
	
	public float getDamage() {
		return damage;
	}
}
